package cn.dnui_zjx523.dnuifood_16110100523.controller;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import cn.dnui_zjx523.dnuifood_16110100523.R;

public  abstract  class BaseActivity extends AppCompatActivity {

    protected int layout_file= R.layout.activity_main;
    abstract void initViews();
    abstract void initEvents();
    abstract void  initData();
    void setLayout(int layout_file)
    {
        setContentView(layout_file);
    }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setLayout(layout_file);
        initViews();
        initEvents();
        initData();

    }
}
